home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 August / macformat-053.iso / mac / Demos / Acacia Educational Multimedia / TESTER.Dxr / 00147.ls < prev    next >
Encoding:
Text File  |  1997-04-15  |  1.4 KB  |  58 lines

  1. global gstate, gnum, gdoor, gobjectlist, gdoorlist, gIdle, gMove, gsounddown, gProgress, gready
  2.  
  3. on exitFrame
  4.   if not gready then
  5.     set gready to 1
  6.   end if
  7.   if gsounddown then
  8.     if the stillDown and rollOver(41) then
  9.       set maxV to the locV of sprite 41 - 60
  10.       set minV to the locV of sprite 41 + 60
  11.       set soundV to the mouseV
  12.       if soundV < maxV then
  13.         set soundV to maxV
  14.       end if
  15.       if soundV > minV then
  16.         set soundV to minV
  17.       end if
  18.       set the locV of sprite 42 to soundV
  19.       set the soundLevel to integer((minV - soundV) / (120 / 7))
  20.     else
  21.       set gsounddown to 0
  22.       beep()
  23.     end if
  24.   end if
  25.   repeat with anobject in gobjectlist
  26.     hruntime(anobject)
  27.   end repeat
  28.   if not rollOver(gIdle) or the mouseDown then
  29.     set the visible of sprite 40 to 0
  30.     updateStage()
  31.   end if
  32.   if not rollOver(12) and not gMove then
  33.     cursor(0)
  34.   end if
  35.   go(the frame)
  36. end
  37.  
  38. on idle
  39.   if not gMove and not (the mouseDown) and not gProgress then
  40.     if gstate = 1 then
  41.       set mode to 0
  42.     else
  43.       set mode to 10
  44.     end if
  45.     repeat with i = 11 to 19
  46.       if rollOver(i) then
  47.         set the memberNum of sprite 40 to 200 + mode + i
  48.         set the locH of sprite 40 to the locH of sprite i
  49.         set the locV of sprite 40 to the locV of sprite i + 33
  50.         updateStage()
  51.         set gIdle to i
  52.         set the visible of sprite 40 to 1
  53.         updateStage()
  54.       end if
  55.     end repeat
  56.   end if
  57. end
  58.